package com.ideal.frame.prefix.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.ideal.frame.entity.AutoModel;
import com.ideal.frame.institutions.entity.InstitutionsOrganizationTb;
import lombok.Data;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @author: zhangdelei
 * @date: 2021/8/24-4:28 下午
 * @Description:
 **/
@Data
@Entity
@Table(name = "prefix_netx_tb")
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public class PrefixNetxTb extends AutoModel implements Serializable, Cloneable {
    /**
     * 下级节点前缀
     */
    private String prefixNext;
    /**
     * 下级节点组织id
     */
    @NotFound(action = NotFoundAction.IGNORE)
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "gnrlid")
    private InstitutionsOrganizationTb institutionsOrganizationTb;
    /**
     * 前缀插入时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date insertdate;
    /**
     * 前缀更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedate;
    /**
     * 前缀删除标志
     */
    private Boolean isdelete;
    /**
     * 下级节点id
     */
    private Integer nodeid;
    /**
     * 是否同步的数据
     */
    private Boolean issync;
    private Long syncId;
    private String syncSourcePrefix;
}
